﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel.DataAnnotations;
namespace Langben.DAL
{
    [MetadataType(typeof(BookMetadata))]//使用BookMetadata对Book进行数据验证
    public partial class Book : IBaseEntity
    {
      
        #region 自定义属性，即由数据实体扩展的实体
        
        [Display(Name = "BuyerId")]
        public string BuyerIdOld { get; set; }

        [Display(Name = "墓主")]
        public string BuriedPeopleRowGuid { get; set; }
        [Display(Name = "墓主")]
        public string BuriedPeopleRowGuidOld { get; set; }
        
        [Display(Name = "ApplicantsId")]
        public string ApplicantsIdOld { get; set; }
        
        #endregion

    }
    public class BookMetadata
    {
			[ScaffoldColumn(false)]
			[Display(Name = "唯一标识", Order = 1)]
			public object RowGuid { get; set; }

			[ScaffoldColumn(true)]
			[Display(Name = "创建时间", Order = 2)]
			[DataType(System.ComponentModel.DataAnnotations.DataType.DateTime,ErrorMessage="时间格式不正确")]
			public DateTime? CreateTime { get; set; }

			[ScaffoldColumn(true)]
			[Display(Name = "经办人", Order = 3)]
			[StringLength(50, ErrorMessage = "长度不可超过50")]
			public object CreatePerson { get; set; }

			[ScaffoldColumn(true)]
			[Display(Name = "主办人", Order = 4)]
			[StringLength(50, ErrorMessage = "长度不可超过50")]
			public object BuyerId { get; set; }

			[ScaffoldColumn(true)]
			[Display(Name = "墓地唯一标识", Order = 5)]
			[StringLength(50, ErrorMessage = "长度不可超过50")]
			public object CemeteryId { get; set; }

			[ScaffoldColumn(true)]
			[Display(Name = "墓地名称", Order = 6)]
			[StringLength(200, ErrorMessage = "长度不可超过200")]
			public object CemeteryName { get; set; }

			[ScaffoldColumn(true)]
			[Display(Name = "墓地编号", Order = 7)]
			[StringLength(50, ErrorMessage = "长度不可超过50")]
			public object CemeteryNo { get; set; }

			[ScaffoldColumn(true)]
			[Display(Name = "墓地墓型", Order = 8)]
			[StringLength(50, ErrorMessage = "长度不可超过50")]
			public object CemeteryShape { get; set; }

			[ScaffoldColumn(true)]
			[Display(Name = "安葬方式", Order = 9)]
			[StringLength(50, ErrorMessage = "长度不可超过50")]
			public object BuriedType { get; set; }

			[ScaffoldColumn(true)]
			[Display(Name = "墓地售价", Order = 10)]
			public object CemeteryPrice { get; set; }
         

			[ScaffoldColumn(true)]
			[Display(Name = "申请人", Order = 12)]
			[StringLength(50, ErrorMessage = "长度不可超过50")]
			public object ApplicantsId { get; set; }

			[ScaffoldColumn(true)]
			[Display(Name = "预定金额", Order = 13)]
			public object BookPrice { get; set; }

			[ScaffoldColumn(true)]
			[Display(Name = "预订天数", Order = 14)]
			[Range(0,2147483646, ErrorMessage="数值超出范围")]
			public int? BookDataCount { get; set; }

			[ScaffoldColumn(true)]
			[Display(Name = "温馨提示", Order = 15)]
			[StringLength(4000, ErrorMessage = "长度不可超过4000")]
			public object Prompt { get; set; }

			[ScaffoldColumn(true)]
			[Display(Name = "备注", Order = 16)]
			[StringLength(4000, ErrorMessage = "长度不可超过4000")]
			public object Remark { get; set; }


    }


}

